package com.javaGame.role;

import com.javaGame.frame.MainFrame;
import com.javaGame.util.ImageChange;

import java.awt.*;

/**
 * 敌人死亡后的爆炸类
 */
public class Bomb extends BaseRole {
    /**爆炸图片数组*/
    public static Image[] bombImg;
    /**图片切换对象*/
    private ImageChange imageChange = new ImageChange(3);
    /**计数器*/
    private int count;
    public Bomb(int x, int y) {
        super(x, y, 80, 80);
    }

    @Override
    public void move() {
        this.currentImg = imageChange.change(bombImg);
        count++;
        if(count>50){
            MainFrame.roleList.remove(this);
        }
    }
}
